# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-elementpath
pkgver=4.1.0
_commit=67e9fbee98c5b144db9fdc8b9cb0b5d09b660b7a
pkgrel=3
pkgdesc="XPath 1.0/2.0 parsers and selectors for ElementTree and lxml"
url="https://github.com/sissaschool/elementpath"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('git' 'python-setuptools')
checkdepends=('python-lxml' 'python-pytest' 'python-xmlschema')
source=("git+https://github.com/sissaschool/elementpath.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd elementpath
  python setup.py build
}

check() {
  cd elementpath
  python -m pytest
}

package() {
  cd elementpath
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
